<?php
require_once(SITE_ROOT . 'config/constants.conf.php');
require_once(SITE_ROOT . 'class/bean/Team.class.php');
require_once(SITE_ROOT . 'lib/PHT.php');

class LogicTeam {

	public function isU20Coach($htTeam) {
		$isU20Coach = false;
		
		for($i=1; $i<=$htTeam->getNationalTeamNumber(); $i++) {
			$ntTeam = $htTeam->getNationalTeam($i);
			if (strpos($ntTeam->getTeamName(), "U-20") === 0) {
				$isU20Coach = true;
			}
		}
		return $isU20Coach;
	}
	
	public function isNTCoach($htTeam) {
		$isNTCoach = false;
		
		for($i=1; $i<=$htTeam->getNationalTeamNumber(); $i++) {
			$ntTeam = $htTeam->getNationalTeam($i);
			if (strpos($ntTeam->getTeamName(), "U-20") === false) {
				$isNTCoach = true;
			}
		}
		return $isNTCoach;
	}
		
}

?>